local uis = game:GetService("UserInputService") local debris = game:GetService("Debris") local controller = Instance.new("RemoteEvent",owner.Character) controller.Name = "controller" local throwSnd = Instance.new("Sound",owner.Character.HumanoidRootPart) throwSnd.SoundId = "rbxassetid://12222200" throwSnd.Volume = 2 throwSnd.PlaybackSpeed = 0.85 controller.OnServerEvent:Connect(function(plr,code) if code == "flare" then local flareBase = Instance.new("Part",owner.Character) debris:AddItem(flareBase,15) flareBase.Size = Vector3.new(0.5,1.75,0.5) flareBase.Material = "Neon" flareBase.Color = Color3.fromRGB(math.random(100,255),math.random(100,255),math.random(100,255)) flareBase.CFrame = owner.Character.HumanoidRootPart.CFrame*CFrame.new(0,0,-1.5) flareBase.Velocity = owner.Character.HumanoidRootPart.CFrame.LookVector*55+Vector3.new(0,25,0) flareBase.RotVelocity = owner.Character.HumanoidRootPart.CFrame.LookVector + Vector3.new(0,0,math.random(-50,50)) local flareLight = Instance.new("PointLight",flareBase) flareLight.Range = 30 flareLight.Shadows = true flareLight.Color = flareBase.Color local sound = Instance.new("Sound",flareBase) sound.SoundId = "rbxassetid://1355880382" sound.Looped = true sound.Volume = 0.25 sound:Play() throwSnd:Play() end end) NLS([[ local uis = game:GetService("UserInputService") local controller = owner.Character.controller local function onInputBegan(input,_gameProcessed) if _gameProcessed then return end if input.KeyCode == Enum.KeyCode.F then controller:FireServer('flare') end end uis.InputBegan:Connect(onInputBegan) ]],owner.PlayerGui)